package io.polly.common.constant;

import lombok.Getter;

/**
 * @author ldz
 * @version V1.0
 * @title: RejectedTypeEnum
 * @description: 暂不提供RejectedExecutionHandler,自定义策略
 * @date: 2022/3/18 21:17
 */
@Getter
public enum RejectedTypeEnum {

    // 丢弃、抛异常，default
    ABORT_POLICY("AbortPolicy"),

    // 自己执行
    CALLER_RUNS_POLICY("CallerRunsPolicy"),

    DISCARD_OLDEST_POLICY("DiscardOldestPolicy"),

    // 丢弃、不抛异常
    DISCARD_POLICY("DiscardPolicy");

    private final String name;

    RejectedTypeEnum(String name) {
        this.name = name;
    }
}
